@import '../common';

.m-voucher {
    padding: 15px 0;
    background-color: #fff;
    .e-mlr {
        margin-left: 25px;
        margin-right: 25px;
    }
    .voucher-head {
        position: relative;
        .ui-input-short {
            width: 70px;
        }
        .ui-item {
            &.f-pa {
                position: absolute;
                left: 50%;
                top:0;
                margin-left: -100px;
            }
        }
    }
    .voucher-body {
        td {
            border: 1px solid #ccc;
            height: 70px;
            vertical-align: middle;
            .cell-edit {
                position: relative;
                width: 100%;
                height: 100%;
                .edit-subject {
                    position: absolute;
                    display: none;
                    right: 6px;
                    top: 27px;
                }
                .edit-balance {
                    position: absolute;
                    padding: 0 4px 3px 8px;
                    display: none;
                    bottom: 0px;
                    left: 0px;
                    background-color: #fff;
                }
                .cell-edit-text {
                    position: absolute;
                    top: -1px;
                    left: -1px;
                    overflow: hidden;
                    width: 100%;
                    height: 100%;
                    min-height: 100%;
                    z-index: 0;
                    border: 1px solid #ccc;
                    line-height: 21px;
                    .cell-text {
                        display: inline-block;
                        padding: 5px 5px 5px 8px;
                    }
                    &.s-hover {
                        z-index: 1;
                        background-color: #F5F5F5;
                        height: auto;
                        .edit-subject {
                            display: inline;
                            top: 24px;
                        }
                        .edit-balance {
                            display: inline;
                        }
                        .cell-text {
                            padding-bottom: 25px;
                        }
                    }
                }
                .cell-edit-inner {
                    display: none;
                    position: absolute;
                    width: 100%;
                    height: 100%;
                    left: -1px;
                    top:-1px;
                    border:1px solid #ccc;
                    .cell-edit-input {
                        height: 60px;
                        padding: 5px 5px 5px 8px;
                        .cell-input-full {
                            width: 100%;
                            height: 100%;
                            line-height: 21px;
                        }
                        input.cell-input-full {
                            width: 175px;
                            padding-right: 2px;
                            text-align: right;
                            line-height: 60px;
                            font-size: 15px;
                            font-weight: bold;
                            letter-spacing: 2px;
                        }
                    }
                }
                &.s-crt {
                    z-index: 2;
                    .cell-edit-text {
                        display: none;
                    }
                    .cell-edit-inner {
                        border-color:#419BF9;
                        box-shadow: 0 0 5px rgba(0,0,0,.5);
                        display: block;
                        .cell-edit-input {
                            background-color: #fff;
                        }
                        .edit-subject {
                            display: inline;
                        }
                        .edit-balance {
                            display: inline;
                            background-color: #fff;
                            padding-bottom: 6px;
                        }
                    }
                }
            }
            &.lines {
                .cell-edit-text {
                    line-height: 70px;
                    text-align: right;
                    .cell-text {
                        padding:0;
                        margin-right: -5px;
                        letter-spacing: 8px;
                        font-size: 15px;
                        font-weight: bold;
                    }
                }
            }
        }
        .col-button {
            width: 25px;
            border:none;
            text-align: center;
            background-color: #fff;
            .cell-button {
                display: none;
                i {
                    display: block;
                    width: 14px;
                    cursor: pointer;
                }
            }
        }
        .col-summary {
            width: 294px;
        }
        .col-subject {
            width: 470px;
            .cell-edit-text {
                &.s-hover {
                    .cell-text {
                        padding-right: 30px;
                    }
                }
            }
            .cell-edit.s-crt {
                .cell-edit-inner {
                    .cell-edit-input {
                        padding-right: 40px;
                    }
                }
            }
        }
        .colinput(){
            width: 100px;
            display: none;
            .cell-edit {
                .cell-edit-inner {
                    display: block;
                    font-size: 12px;
                }
                .cell-input {
                    width: 58px;
                    background: none;
                    border-bottom:1px solid transparent;
                    font-size: 12px;
                    &.s-rdy {
                        border-bottom:1px solid transparent !important;
                    }
                }
                &.s-crt {
                    .cell-input {
                        border-bottom-color: #ccc;
                    }
                }
            }
        }
        .col-number {
            .colinput;
        }
        .col-currency {
            .colinput;
        }
        .col-debit, .col-credit {
            width: 190px;
        }
        .voucher-thead {
            div {
                height: 35px;
                line-height: 35px;
            }
            .lines {
                border-top: 1px solid #ccc;
                b {
                    float: left;
                    width: 15.2px;
                    margin-left: 2px;
                    overflow: hidden;
                }
            }
        }
        .e-pr1 {
            padding-right: 1px;
        }
        .table-row {
            &.s-hover {
                background-color: #F5F5F5;
                .col-button {
                    .cell-button {
                        display: inline;
                    }
                }
                .edit-balance {
                    background-color: #f5f5f5;
                }
            }
        }
        &.show-number {
            .col-summary {
                width: 243px;
            }
            .col-subject {
                width: 420px;
            }
            .col-number {
                display: table-cell;
            }
        }
        &.show-currency {
            .col-summary {
                width: 243px;
            }
            .col-subject {
                width: 420px;
            }
        }
        &.show-number.show-currency {
            .col-summary {
                width: 193px;
            }
            .col-subject {
                width: 369px;
            }
            .col-currency {
                display: table-cell;
            }
        }
    }
    .voucher-content {
        position: relative;
        margin-right: 8px;
        overflow: auto;
        max-height: 285px;
    }
    .voucher-foot {
        
    }
    .lines {
        background: url("../../images/lines.png?v=cfc55b6") repeat-y center;
    }
}

.ui-suggest.suggest-subject {
    .ui-suggest-list {
        border-color: #419BF9;
        border-bottom:none;
        li {
            height: 40px;
            line-height: 40px;
        }
    }
    .add-subject {
        padding-left: 10px;
        display: block;
        height: 38px;
        line-height: 38px;
        background-color: #FAE7C7;
        border:1px solid #419BF9;
        border-top:none;
        &:hover {
            color: #323232;
            background-color: #F7E5C1;
        }
    }
}
